package 富婆梦.第一阶段.Java基础视频学习.线程的练习.练习;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @ProjectName: java-learning
 * @Package: 富婆梦.第一阶段.线程的练习.练习.TestNotify
 * @ClassName: Demo5
 * @Author: hemengjin
 * @Description:
 * @Date:2021/11/1 20:29
 * @Version: 1.0
 */
public class Demo5 implements Runnable{
    int i=0;
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+":"+ ++i);
    }

    public static void main(String[] args) {
        ExecutorService ex = Executors.newFixedThreadPool(2);
        ex.submit(new Demo5());
        ex.submit(new Demo5());
    }
}
